package servlet.ann.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

@WebFilter(urlPatterns = "/ws", asyncSupported = true)
public class AnnFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        System.out.println("WorldFilter-init");
    }

    @Override
    public void destroy() {
        System.out.println("WorldFilter-destroy");
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("WorldFilter-doFilter");
        chain.doFilter(request, response);
    }
}